﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="VideosPlayComments.aspx.vb" Inherits="Assignment_2___Prototype.VideosPlayComments" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .VideoPlayInfo1
        {
            width: 769px;
            text-align: left;
        }
        .VideoPlayInfo2
        {
            height: 72px;
            width: 823px;
            margin-top: 67px;
            margin-bottom: 0px;
        }
        .spacing
        {
            height: 367px;
            width: 911px;
            margin-bottom: 324px;
        }
        .VideosPlayCommentsInfo
        {
            width: 893px;
            height: 56px;
        }
        .VideoPlayFrame
        {
            height: 756px;
            width: 894px;
        }
        .VidStats
        {
            width: 915px;
            height: 245px;
        }
        .AddAndComment
        {
            height: 1088px;
        }
        .AddCommentForVideoInstruction
        {
            height: 78px;
        }
        .addVideoComments
        {
            height: 147px;
            width: 555px;
            margin-top: 106px;
        }
        .statsAndtagsforVideo
        {
            height: 156px;
        }
        .Likes
        {
            width: 228px;
            height: 112px;
            text-align: center;
            font-size: large;
        }
        .VideoTags
        {
            width: 894px;
            height: 132px;
        }
        
        .st
        {
            font-size: medium;
        }
        
        
        .VideosStats100
        {
            height: 103px;
            width: 383px;
        }
        
        
        .videoStats200
        {
            height: 143px;
            width: 436px;
        }
        
        
        .tags
        {
            width: 205px;
            height: 91px;
        }
        
        
        .likesVideo
        {
            width: 219px;
            height: 89px;
        }
        
        
        .views
        {
            width: 209px;
            height: 90px;
        }
        
        
        .style5
        {
            float: right;
            width: 205px;
            height: 42px;
            
            
        }
        
        
        .commentsVideo
        {
            height: 268px;
        }
        
        
        .commentsVideo2
        {
            height: 31px;
            width: 581px;
        }
        
        
        .videoObjects
        {
            height: 128px;
            width: 708px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <div class="VideoPlayFrame">
        <asp:FormView ID="FormView3" runat="server" DataSourceID="SqlDataSource1" Width="451px"
            Height="400px" BorderStyle="None" Style="margin-bottom: 0px">
            <EditItemTemplate>
                <iframe width="220" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>"
                    frameborder="1"></iframe>
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                    Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                <iframe width="420" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>"
                    frameborder="1"></iframe>
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                    Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                <iframe width="420" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>"
                    frameborder="1"></iframe>
                <br />
            </ItemTemplate>
        </asp:FormView>
        <br />
        <br />

        <div class="videoStats200">
                <div class="stat4" style=" text-align: center;
                    width: 424px; height: 136px;">
                    <div class="style5">
                        <h2>Views</h2><br />
                            <br />
                            <asp:Label ID="lblTotalViews" runat="server" Text="Label" Font-Size="Medium" BorderStyle="Inset"
                                Width="74px"></asp:Label>
                       
                    </div>
                    <div class="views">
                        <h2 class="style5">Likes</h2>
                        <br />
                        <asp:Image ID="imgLike" runat="server" Height="35px" ImageUrl="~/Images/like.png"
                            Style="text-align: center" Width="55px" />
                        <asp:Label ID="lblTotalCounts" runat="server" Text="Label" Font-Size="Medium" BorderStyle="Inset"
                            Width="63px"></asp:Label>
                            <br />
                            <br />
                        <asp:Button ID="btnLike" runat="server" Height="35px" 
                            Style="text-align: left; margin-left: 19px; margin-right: 0px;" Text="Like the Video"
                            Width="146px" Font-Bold="True" CssClass="buttons" />
                    </div>
                </div>
            </div>


          <br />
        <br />

        <div class="VideosStats100">
            
        <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource2" Width="382px"
            BorderStyle="Solid" BorderWidth="4px" BackColor="White" BorderColor="#DEDFDE"
            CellPadding="4" Font-Bold="False" ForeColor="Black" GridLines="Vertical">
            <EditItemTemplate>
                <strong>Description:</strong>
                <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                <br />
                <strong>Video Posted by:</strong> <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <asp:LinkButton ID="UpdateButton0" runat="server" CausesValidation="True" CommandName="Update"
                    Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <EditRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <InsertItemTemplate>
                <strong>Description:</strong>
                <asp:TextBox ID="UserNameTextBox1" runat="server" Text='<%# Bind("UserName") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:TextBox ID="VideoDescriptionTextBox0" runat="server" Text='<%# Bind("VideoDescription") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:TextBox ID="TimeUploadedTextBox1" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                <br />
                <strong>Video Posted by:</strong> <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <asp:LinkButton ID="InsertButton0" runat="server" CausesValidation="True" CommandName="Insert"
                    Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                <strong>Description:</strong>
                <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Bind("VideoDescription") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Bind("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                <br />
                <strong>Video Posted by:</strong> <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
            </ItemTemplate>
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#F7F7DE" />
        </asp:FormView>
            
            <br />
            
        </div>

         <br />
             <br />
             <br />
             <br />
            


        <div class="videoObjects">
            <strong>
            <br />
            Comment on the Video:</strong><br />
            <asp:TextBox ID="txtAddVideoComment" runat="server" Height="96px" Width="391px" TextMode="MultiLine"></asp:TextBox>
            <asp:Button ID="btnAddComment" runat="server" Text="Add Comment" CssClass="buttons"
                Width="144px" />
        </div>
    </div>
    <div class="commentsVideobox">
    </div>

                <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
            



    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource3">
        <AlternatingItemTemplate>
            <strong>Comment:</strong>
            <asp:Label ID="CommentBodyLabel" runat="server" Text='<%# Eval("CommentBody") %>' />
            <br />
            <strong>Date Uploaded:</strong>
            <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
            <br />
            <strong>Time Uploaded:</strong>
            <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
            <br />
            <strong>Comment Posted by:</strong> <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
            <br />
            <br />
            </span>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <span style="">VideoCommentID:
                <asp:Label ID="VideoCommentIDLabel1" runat="server" Text='<%# Eval("VideoCommentID") %>' />
                <br />
                CommentBody:
                <asp:TextBox ID="CommentBodyTextBox" runat="server" Text='<%# Bind("CommentBody") %>' />
                <br />
                DateUploaded:
                <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                <br />
                TimeUploaded:
                <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                <br />
                UserName: <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                VideoID:
                <asp:TextBox ID="VideoIDTextBox" runat="server" Text='<%# Bind("VideoID") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br />
                <br />
            </span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <span style="">CommentBody:
                <asp:TextBox ID="CommentBodyTextBox" runat="server" Text='<%# Bind("CommentBody") %>' />
                <br />
                DateUploaded:
                <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                <br />
                TimeUploaded:
                <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                <br />
                UserName: <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                VideoID:
                <asp:TextBox ID="VideoIDTextBox" runat="server" Text='<%# Bind("VideoID") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br />
                <br />
            </span>
        </InsertItemTemplate>
        <ItemTemplate>
            <strong>Comment:</strong>
            <asp:Label ID="CommentBodyLabel" runat="server" Text='<%# Eval("CommentBody") %>' />
            <br />
            <strong>Date Uploaded:</strong>
            <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
            <br />
            <strong>Time Uploaded:</strong>
            <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
            <br />
            <strong>Comment Posted by:</strong> <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
            <br />
            <br />
            </span>
        </ItemTemplate>
        <LayoutTemplate>
            <div id="itemPlaceholderContainer" runat="server" style="">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="">
                <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" />
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" />
                    </Fields>
                </asp:DataPager>
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="">VideoCommentID:
                <asp:Label ID="VideoCommentIDLabel" runat="server" Text='<%# Eval("VideoCommentID") %>' />
                <br />
                CommentBody:
                <asp:Label ID="CommentBodyLabel" runat="server" Text='<%# Eval("CommentBody") %>' />
                <br />
                DateUploaded:
                <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                <br />
                TimeUploaded:
                <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                <br />
                UserName: <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>">
                    <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                VideoID:
                <asp:Label ID="VideoIDLabel" runat="server" Text='<%# Eval("VideoID") %>' />
                <br />
                <br />
            </span>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT Video_Comments.CommentBody, Video_Comments.DateUploaded, Video_Comments.TimeUploaded, aspnet_Users.UserName, Video_Comments.VideoID, Video_Comments.VideoCommentID FROM (aspnet_Users INNER JOIN Video_Comments ON aspnet_Users.UserId = Video_Comments.UserID) WHERE (Video_Comments.VideoID = ?) ORDER BY Video_Comments.VideoCommentID DESC">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="id" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded, aspnet_Users.UserName, Videos.VideoID FROM (aspnet_Users INNER JOIN Videos ON aspnet_Users.UserId = Videos.UsernameID) WHERE (Videos.VideoID = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="id" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT VideoTitle, VideoLink FROM Videos WHERE (VideoID = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="id" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
